<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="html-el" uri="http://struts.apache.org/tags-html-el" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>  
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>   
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>修改楼栋信息</title>
</head>
<body>
	<p>修改楼栋信息</p>
	<form action="updateBuilding.do?method=update" name="updateBuildingForm" method="post">
		<input type="hidden" value="${building.id }" name="id"/>
		<label>楼栋名称<input type="text" name="name" value="${building.name}"/></label>
		<label>楼栋层数<input type="text" name="floors" value="${building.floors }"/></label>
		<label>楼栋简介<input type="text" name="description" value="${building.description }"/></label>
		<label>楼栋寝室总数<input type="text" name="dormitoryCount" value="${building.dormitoryCount }"/></label>
		<label>可住人数<input type="text" name="capacity" value="${building.capacity }"/></label>
		<label>建造时间<input type="text" name="buildDate" value="<fmt:formatDate value="${building.buildDate}" pattern="yyyy-MM-dd"/>"/></label>
		所在校区<select name="campus" >
			<c:forEach items="${campuses.list}" var="campus">
				<option value=${campus.id } ${campus.id eq building.campus.id ? "selected=\"selected\"" : "" }>${campus.name }</option>
			</c:forEach>
		</select>
		<input type="submit" value="提交"/>
	</form>
</body>
</html>